
export default {
    namespace: 'baseInfo',
    state: {
        baseInfo: {},
        visible: true,
    },

    effects: {
        * getBaseInfo({ payload }, { call, put, all, select }) {
            const data = {
                name: 1232333,
            }
            yield put({ type: 'getBaseInfoSuccess', payload: { data } });
            return data;
        },

        * updateBaseInfo({ payload }, { call, put }) {
            const data = {
                name: 2222
            };
            yield put({ type: 'getBaseInfoSuccess', payload: { data } });
        }
    },

    reducers: {
        getBaseInfoSuccess(state, { payload }) {
            console.log('success', payload)
            state.baseInfo = payload.data;
            return state.baseInfo
        },
    },
}